<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/26 0026
 * Time: 13:56
 */
namespace app\userweb\controller;
use think\Controller;
use \think\Db;
use \think\Config;
use \think\Session;
use \think\Cookie;
use think\config\driver\Json;
class Index extends Controller{
    //----------------------------------------------
    // 首页
    //----------------------------------------------

    //首页
    public function index(){
        return view(APP_PATH.request()->module().'/view/html/Homepage/index.html');
    }

    //商家页面.
    public function shopList(){
        return view(APP_PATH.request()->module().'/view/html/Homepage/shop.html');
    }

    //商品详情页面
    public function productInfo(){
        return view(APP_PATH.request()->module().'/view/html/Homepage/productDetail.html');
    }

    //收藏夹
    public function collectionFolder(){
        return view(APP_PATH.request()->module().'/view/html/Homepage/collectionFolder.html');
    }

    //联系客服
    public function customerService(){
        return view(APP_PATH.request()->module().'/view/html/Homepage/customerService.html');
    }

    //立即订购
    public function orderNow(){
        return view(APP_PATH.request()->module().'/view/html/Homepage/orderNow.html');
    }

    //购货车
    public function shoppingCar(){
        return view(APP_PATH.request()->module().'/view/html/Homepage/shoppingCar.html');
    }
    //我的购货车
    public function myShoppingCar(){
        return view(APP_PATH.request()->module().'/view/html/Homepage/myShoppingCar.html');
    }
    //----------------------------------------------
    // 登录.注册
    //----------------------------------------------

    // 密码登录
    public function login(){
        return view(APP_PATH.request()->module().'/view/html/login/login.html');
    }

    // 找回密码
    public function resetPassword(){
        return view(APP_PATH.request()->module().'/view/html/login/resetPassword.html');
    }

    // 短信登录
    public function smsLogin(){
        return view(APP_PATH.request()->module().'/view/html/login/smsLogin.html');
    }

    // 注册
    public function register(){
        return view(APP_PATH.request()->module().'/view/html/login/register.html');
    }

    // 完善用户注册信息
    public function improveInfo(){
        return view(APP_PATH.request()->module().'/view/html/login/improveInfo.html');
    }

    //----------------------------------------------
    // 个人信息
    //----------------------------------------------

    // 个人信息首页
    public function myInfo(){
        return view(APP_PATH.request()->module().'/view/html/my/myinfo.html');
    }

    // 修改个人信息
    public function editMyInfo(){
        return view(APP_PATH.request()->module().'/view/html/my/editMyInfo.html');
    }

    // 我的订单
    public function myOrder(){
        return view(APP_PATH.request()->module().'/view/html/my/myOrder.html');
    }

    // 系统通知
    public function notification(){
        return view(APP_PATH.request()->module().'/view/html/my/notification.html');
    }

    // 设置
    public function set(){
        return view(APP_PATH.request()->module().'/view/html/my/set.html');
    }
    
    // 我的收藏
    public function myCollection(){
        return view(APP_PATH.request()->module().'/view/html/my/myCollection.html');
    }
    
    // 我的评价
    public function evaluation(){
        return view(APP_PATH.request()->module().'/view/html/my/evaluation.html');
    }


    
   //----------------------------------------------
    // 购货
    //----------------------------------------------

    // 历史报价单
    public function historyPurchase(){
        $categoryData = Db::name('base_data')->where(['level'=>0,'type_menu' =>1,'flag'=>1])->select();//类别
        $this->assign('list', $categoryData);
        $this->assign('user_id', Cookie::get('user_id'));
        return view(APP_PATH.request()->module().'/view/html/Shop/historyPurchase.html');
    }

    // 购货
    public function PurchaseIndex(){
        $categoryData = Db::name('base_data')->where(['level'=>0,'type_menu' =>1,'flag'=>1])->select();//类别
        $this->assign('list', $categoryData);
        return view(APP_PATH.request()->module().'/view/html/Shop/purchase.html');
    }




}